package com.aepryus.loom;

import javax.servlet.http.*;

public class Credentials implements HttpSessionBindingListener {
	private long usernameID;
	private String username;
	private String name;
	private String lastView;
	private long menuID;

	public void setUsernameID (long usernameID) {this.usernameID = usernameID;}
	public long getUsernameID () {return usernameID;}
	public void setUsername (String username) {this.username = username;}
	public String getUsername () {return username;}
	public void setName (String name) {this.name = name;}
	public String getName () {return name;}
	public void setLastView (String lastView) {this.lastView = lastView;}
	public String getLastView () {return lastView;}
	public void setMenuID (long menuID) {this.menuID = menuID;}
	public long getMenuID () {return menuID;}

// HttpSessionBindingListener ==================================================
	public void valueBound (HttpSessionBindingEvent e) {
		Controller.controller.getTracker().trackSession(e.getSession());
	}
	public void valueUnbound (HttpSessionBindingEvent e) {
		Controller.controller.getTracker().expireSession(e.getSession());
	}
}

